package com.hdaccp.foodsales.service.impl;

import com.hdaccp.foodsales.dao.UserDao;
import com.hdaccp.foodsales.entity.User;
import com.hdaccp.foodsales.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao UserDao ;
    @Override
    public List<User> findAll(String username, int offset, int limit) {
        return UserDao.query(username,offset,limit);
    }

    @Override
    public long findTotalCount(String username) {
        return UserDao.getTotalCount(username) ;
    }
}
